package com.foreveross.proxyip.application.pool.vo;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.foreveross.proxyip.infra.utils.DateUtils;

import com.foreveross.proxyip.entity.ApplyIpLogEntity;

public class ApplyIpLogEntityVo {
//	public final static SimpleDateFormat sdf=new SimpleDateFormat(DateConvert);

	
	private Long id;

	private String channelCode;

	private String channelName;

	private String clientIp;

	private Date createTime;

	private String ips;

	private String message;

	private Long reponseTime;

	private Integer state;
	
	private String createTimeStr ;

	public ApplyIpLogEntityVo(ApplyIpLogEntity entity){
		this.id = entity.getId();
		this.channelCode = entity.getChannelCode();
		this.channelName = entity.getChannelName();
		this.clientIp = entity.getClientIp();
		this.createTime = entity.getCreateTime();
		this.ips = entity.getIps();
		this.message = entity.getMessage();
		this.reponseTime = entity.getReponseTime();
		this.state = entity.getState();
		
		
	}
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getChannelCode() {
		return channelCode;
	}

	public void setChannelCode(String channelCode) {
		this.channelCode = channelCode;
	}

	public String getChannelName() {
		return channelName;
	}

	public void setChannelName(String channelName) {
		this.channelName = channelName;
	}

	public String getClientIp() {
		return clientIp;
	}

	public void setClientIp(String clientIp) {
		this.clientIp = clientIp;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getIps() {
		return ips;
	}

	public void setIps(String ips) {
		this.ips = ips;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Long getReponseTime() {
		return reponseTime;
	}

	public void setReponseTime(Long reponseTime) {
		this.reponseTime = reponseTime;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}
	
	public String getCreateTimeStr() {
		return generateDateStr(createTime);
	}

	public void setCreateTimeStr(String createTimeStr) {
		this.createTimeStr = createTimeStr;
	}

	private String generateDateStr(Date date){
		return date==null?"":DateUtils.DATE_FMT_CN_BARS_YMD_HMS.format(date);
	}
	
}
